function wallBlock() {
	this.x = 7;
	this.y = 37;
	this.arr = new Array();
};

function getPointonWall(obj) {
	if (obj.stCol == obj.ndCol) {
		var n = 1;
	} else {
		var n = 0;
	}
	wstRow = (obj.sty - 37) / 21;
	wstCol = (obj.stx - 7) / 21 - n;
}

function checkLine() { //检查背景墙，如果一行满，消掉
	var line = 0;
	if (wstRow >= 0) {
		for (var i = wstRow; i < wstRow + 4; i++) {
			if (i < 20) {
				for (var j = 0; j < 10; j++) {
					line += wall.arr[i][j];
				}
				if (line == 10) { //如果满了
					fullLine.push(i);
					noFullLine = false;
					doBling = true;
					doFresh = false;
				}
				line = 0;
			}
		}
	}
}

function linesBling() {
		ctx.fillStyle = "rgba(205,215,150," + blingAlpha + ")";
		for (var i = fullLine[0]; i < fullLine[0] + fullLine.length; i++) {
		ctx.clearRect(wall.x,wall.y+i * 21,210,19);
			for (var j = 0; j < 10; j++) {
				ctx.fillRect(wall.x + j * 21, wall.y + i * 21, 19, 19);
				ctx.fill();
				console.log(blingAlpha)
			}
		}
	blingAlpha -= 0.2;
	blingAlpha = blingAlpha.toFixed(1)

}

function freshWall(length, arr) { //消掉满的行
	for (var t = 0; t < length; t++) {
		for (var i = arr[t] - 1; i >= 0; i--) {
			for (var j = 0; j < 10; j++) {
				wall.arr[i + 1][j] = wall.arr[i][j]; //上面的下移一格
			}
		}
		score++;
		superb++;
	}
	if (superb > 3) {
		score++;
		superb = 0;
	}
	if (score > 30 * level) {
		level++;
		shiftRan--;
	}
}